/*
 * CTDR_Global.h
 *
 *  Created on: 6 déc. 2010
 *      Author: mbenoit
 */
#include "TMath.h"
#include "TRandom3.h"
#ifndef CTDR_GLOBAL_H_
#define CTDR_GLOBAL_H_


//dimensions
const double cm3 = 1.e12;
const double cm2 = 1.e8;
const double cm = 1.e4;
const double um = 1.;
const double ns = 1.;
const double s =1.e9;

// Trapping constants
const double fluence = 5e14;
const double Beta_electrons = 5e-16/ns;
const double trappingTime = 1.0/(Beta_electrons*fluence);
const double Temps_pnormal=1e8; // shallow trapping time (s)
const double Temps_pprofond=trappingTime; // deep trapping time (s)
const double Temps_d=1e8;       // shallow detrapping time (s)
const double pi=TMath::Pi();	  // Pi
const double constrep=1.602e-19/(pi*8.854e-12*12.0);// repulsion constant (unused)





const double Temperature = 273.0 ; //[K]


// Silicon electron and hole transport constants
const double Default_Electron_Mobility=1400.0; // Electron mobility (cm2/Vs)
const double Default_Hole_Mobility=450.0;// Hole mobility (cm2/Vs
const double Default_conv_Electron_Mobility=140.0; // Electron mobility (um2/V1e-9s)
const double Default_conv_Hole_Mobility=45.0;// Hole mobility (um2/V1e-9s

const double Default_Electron_D=36; // Electron mobility (cm2/s)
const double Default_Hole_D=12;// Hole mobility (cm2/s
const double Default_conv_Electron_D=3.60; // Electron mobility (um2/1e-9s)
const double Default_conv_Hole_D=1.20;// Hole mobility (um2/1e-9s

//mobility dependence on electric field
const double Electron_AlphaField = 2.4e2 ; //[um/ns]
const double Electron_ThetaField = 0.8;
const double Electron_TempNominal = 600.0 ; // [K]

const double Electron_Beta = 2.0;
const double Electron_Saturation_Velocity = Electron_AlphaField*TMath::Power(1.0+Electron_ThetaField*TMath::Exp(Temperature/Electron_TempNominal),-1.0);

const double Hole_AlphaField = 2.4e2 ; //[um/ns]
const double Hole_ThetaField = 0.8;
const double Hole_TempNominal = 600.0 ; // [K]

const double Hole_Beta = 1.0 ;
const double Hole_Saturation_Velocity = Hole_AlphaField*TMath::Power(1.0+Hole_ThetaField*TMath::Exp(Temperature/Hole_TempNominal),-1.0);


// Geometry related constants
const double zmax=300;
const double Lx=1592.5;
const double Ly=1592.5;


//Time stepper constants
const double tlow=0.001;   //time in nanoseconds
const double tup=0.025;
const double Target=1e-5;
const double tmax=35;

class CTDR_Global {

public:
	CTDR_Global();
	virtual ~CTDR_Global();
	const double GetTprofond(){return Temps_pprofond;};
	TRandom3 *rand;

};


#endif /* CTDR_GLOBAL_H_ */
